#include<iostream>
#include<string>

using namespace std;

class Person
{
public:
    Person(){};
    ~Person(){};
    string name;
    void setName(const string &name)
    {
    this->name=name;}

    string getName() const
    {
    return name;}

    void setAge(int age)
    {
    this->age=age;}

    int getAge() const
    {
    return age;}
protected:
    int age;
private:
    float height;
};


class Student1:public Person
{
public:
    Student1(){};
    ~Student1(){};
};

class Student2:protected Person
{
public:
    Student2(){};
    ~Student2(){};

};

class Student3:private Person
{
public:
    Student3(){};
    ~Student3(){};

};


int main(){
    Student1 *stu1=new Student1;
    Student2 *stu2=new Student2;
    Student3 *stu3=new Student3;
    
    stu3->setName("qt");
    stu3->setAge(5);


    cout<<"My name is "<<stu3->getName()<<endl<<"My age is "<<stu3->getAge()<<endl;

    delete stu1;stu1=nullptr;
    delete stu2;stu2=nullptr;
    delete stu3;stu3=nullptr;

    return 0;
}
